<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="com.java.service.*,java.util.*,com.java.model.UserSession,com.java.util.*"%>
<jsp:include page="common/header.jsp"></jsp:include>
<%
	HashMap map			= new HashMap();
	ArrayList list 		= null;
	String poi_kisu_std_no[] 	= request.getParameterValues("su_poi_kisu_std_no");
	String su_user_id[] 	= request.getParameterValues("su_user_id");
	String end_gubun[] 	= request.getParameterValues("end_gubun");

	String checkbox[] 	= request.getParameterValues("checkbox");
	
	String poi_kisu_std_no1[] 	= new String[checkbox.length];
	String su_user_id1[] 	= new String[checkbox.length];
	String end_gubun1[] 	= new String[checkbox.length];
	
	
	//체크된 항목의 값만 update해주기 위함
	for(int i =0 ; i < checkbox.length; i++){
		poi_kisu_std_no1[i] 		= poi_kisu_std_no[Integer.parseInt(checkbox[i])];
		su_user_id1[i] 	= su_user_id[Integer.parseInt(checkbox[i])];
		end_gubun1[i] 		= end_gubun[Integer.parseInt(checkbox[i])];
		
		System.out.println("넘겨온값 =====>" + " poi_kisu_std_no===>"+poi_kisu_std_no[Integer.parseInt(checkbox[i])]+ " su_user_id===>" + su_user_id[Integer.parseInt(checkbox[i])]+ " end_gubun===>" + end_gubun[Integer.parseInt(checkbox[i])]);
	}
	
	CommonDaoService commonservice = new CommonDaoService("Com0102lp02UpdateDao");
	map.put("poi_kisu_std_no",poi_kisu_std_no1);
	map.put("su_user_id",su_user_id1);
	map.put("end_gubun",end_gubun1);	
	
	list = (ArrayList)commonservice.commonDaoMethod(map);
	
	String result_Message = "";
	if(list != null){
		if(list.size() > 0){
			result_Message = (String)list.get(0);
		}
	}

%>
<script>
	<%if(list != null){%>
		alert('<%=result_Message%>');
		parent.location.reload();
	<%}%>
</script>
<body>

</body>
</html>